<div class="t_2">
     <div class="fl">销假</div>
     <div class="fr add_form"><a href="javascript:;" id="add_table"></a></div>
</div>
<div class="order_show" id="info_form">
     <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
     	<tr>
			<td class="td1">请假单状态：</td>
			<td><?=$this->orderState?></td>
		</tr>
        <tr>
			<td class="td1">申请人：</td>
			<td><?=$this->vacation['nickname']?></td>
		</tr>
     	<tr>
			<td class="td1">请假天数总计：</td>
			<td><?=$this->vacation['total_vacation']?></td>
		</tr>
        <tr>
			<td class="td1">法定节假日：</td>
			<td><?=$this->vacation['statutory_holiday']?></td>
		</tr>
        <tr>
			<td class="td1">请假次数总计：</td>
			<td><?=$this->vacation['sum_vacation']?></td>
		</tr>
		<tr>
			<td class="td1">开始时间：</td>
			<td><?=date('Y-m-d',$this->vacation['start_date'])?></td>
		</tr>
		<tr>
			<td class="td1">结束时间:</td>
			<td><?=date('Y-m-d',$this->vacation['end_date'])?></td>
		</tr>
        

		<tr>
			<td class="td1">备注：</td>
			<td><?=$this->vacation['mark']?></td>
		</tr>
     </table>
</div>
<div class="order_show" id="info_form">
	<?php if($this->vacation['audit_state']=='3'): ?>
     <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
     	<tr>
			<td class="td1">销假时间:</td>
			<td>
            <input type="text"  style="width:100px;" id="start_date" name="start_date" value="<?=$this->start_date?>" readonly="1" onclick="new Calendar(2011,2018).show(this)"  />
            </td>
		</tr>
		<tr>
			<td class="td1">操作：</td>
			<td><input type="button" id="lapse" value="销假"/>
            <input type="hidden" id="vid" name="vid" value="<?php echo $this->vacation['vacation_id']; ?>"/>
            </td>
		</tr>
		<?php endif; ?>
     </table>
</div>
<script>
$(function(){
	// 销假
    $('#lapse').click(function (){
        if(confirm('确定销假吗？')) 
		{
			var val = $('#vid').val();
			var sdate = $('#start_date').val();
            $.getJSON('system.php',{app:'<?php echo APP; ?>',start_date:sdate,mod:'lapse',vid:val},function(data){
                if (data.state <= 0)
                {
                    alert(data.message);
                    return false;
                }
				alert(data.message);
				window.location.reload();
            });
        }
    });
});
</script>